package com.mashibing.apiboss.remote;

import org.mashibing.dto.Car;
import org.mashibing.dto.DriverCarBindingRelationship;
import org.mashibing.dto.DriverUser;
import org.mashibing.dto.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author:
 * @create: 2024/4/26 16:33
 * @description:
 */
@FeignClient("service-driver-user")
public interface ServiceDriverUserClient {

    @PostMapping("/user")
    ResponseResult addUser(@RequestBody DriverUser driverUser);

    @PutMapping("/user")
    ResponseResult updateUser(@RequestBody DriverUser driverUser);

    @PostMapping("/car")
    ResponseResult addCar(@RequestBody Car car);

    @PostMapping("/driver_car_binding_relationship/bind")
    ResponseResult bind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship);

    @PostMapping("/driver_car_binding_relationship/unbind")
    ResponseResult unbind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship);
}
